package com.guiwu.gteway.industryapp.Device.module;

import com.guiwu.gteway.industryapp.Device.MyAdapter.MonitorExpandAdapter;

/**
 * Created by qiaoguan on 2018/3/10. 监控点数据承载
 */

public class MonitorData {

    private String streamUid;
    private String sn;
    private String bindDeviceName;
    private String bindDeviceNickName;
    private String bindDeviceType;
    private String streamId;
    private String streamName;
    private String writeRead;
    private String desc;
    private String unit;
    private String dataType;
    private int slaveAdr;
    private String addressType;
    private int address;
    private int modbusRegisterAdd;
    private String modbusCode;
    private int state;
    private float deadArea;
    private String label0;
    private String label1;
    private int intBit;
    private int decimalBit;
    private String lastTime;

    private MonitorCmd cmd;

    public MonitorData(){

    }

    public MonitorData(String streamName){
        this.streamName = streamName;
    }

    public String getStreamId() {
        return streamId;
    }

    public void setStreamId(String streamId) {
        this.streamId = streamId;
    }

    public String getWriteRead() {
        return writeRead;
    }

    public void setWriteRead(String writeRead) {
        this.writeRead = writeRead;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public MonitorCmd getCmd() {
        return cmd;
    }

    public void setCmd(MonitorCmd cmd) {
        this.cmd = cmd;
    }

    public String getStreamUid() {
        return streamUid;
    }

    public void setStreamUid(String streamUid) {
        this.streamUid = streamUid;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getStreamName() {
        return streamName;
    }

    public void setStreamName(String streamName) {
        this.streamName = streamName;
    }


    public String getLastTime() {
        return lastTime;
    }

    public void setLastTime(String lastTime) {
        this.lastTime = lastTime;
    }

    public String getBindDeviceType() {
        return bindDeviceType;
    }

    public void setBindDeviceType(String bindDeviceType) {
        this.bindDeviceType = bindDeviceType;
    }

    public String getBindDeviceNickName() {
        return bindDeviceNickName;
    }

    public int getAddress() {
        return address;
    }

    public String getAddressType() {
        return addressType;
    }

    public String getUnit(){
        return this.unit;
    }

    @Override
    public String toString() {
        return getStreamName();
    }


    public int getIntBit() {
        return intBit;
    }

    public int getDecimalBit() {
        return decimalBit;
    }

    public int getSlaveAdr() {
        return slaveAdr;
    }

    public int getModbusRegisterAdd() {
        return modbusRegisterAdd;
    }

    public String getModbusCode() {
        return modbusCode;
    }

    public ModbusMonitor getAsModbus(){
        return new ModbusMonitor(this);
    }

    public LocalMonitor getAsLocal(){
        return new LocalMonitor(this);
    }

    public PLCMonitor getAsPLC(){
        return new PLCMonitor(this);
    }
}
